HTMLify
style.css
Views: 8 | Author: cody
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap");
:root {
--clr-primary-400: 271 30% 34%;
--clr-secondary-400: 329 25% 50%;
--clr-secondary-500: 7 100% 73%;
--clr-neutral-100: 0 0% 100%;
--clr-neutral-200: 210 46% 95%;
--clr-neutral-300: 29 100% 79%;
--ff-primary: "roboto", sans-serif;
--fw-400: 500;
--fw-700: 600;
--fs-300: 0.6875rem;
--fs-400: 0.8125rem;
--fs-500: 1.25rem;
}
body {
display: grid;
min-height: 100vh;
font-family: var(--ff-primary);
font-weight: var(--fw-400);
background-color: hsl(var(--clr-neutral-200));
}
/* utilities */
.flex {
display: flex;
gap: var(--gap, 1rem);
}
.flow > *:where(:not(:first-child)) {
margin-top: var(--flow-spacer, 1em);
}
.bg-primary-400 {
background: hsl(var(--clr-primary-400));
}
.bg-secondary-400 {
background: hsl(var(--clr-secondary-400));
}
.bg-secondary-500 {
background: hsl(var(--clr-secondary-500));
}
.bg-neutral-100 {
background: hsl(var(--clr-neutral-100));
}
.text-neutral-100 {
color: hsl(var(--clr-neutral-100));
}
.text-secondary-400 {
color: hsl(var(--clr-secondary-400));
}
.border-primary-400 {
border: 2px solid #a775f1;
}
.testimonial-grid {
display: grid;
gap: 1.5rem;
grid-template-areas: one two three four five;
padding-block: 2rem;
width: min(95%, 70rem);
margin-inline: auto;
}
.testimonial:nth-child(1) {
grid-area: one;
}
.testimonial:nth-child(2) {
grid-area: two;
}
.testimonial:nth-child(3) {
grid-area: three;
}
.testimonial:nth-child(4) {
grid-area: four;
}
.testimonial:nth-child(5) {
grid-area: five;
}
.testimonial {
font-size: var(--fs-400);
padding: 2rem;
border-radius: 0.5rem;
box-shadow: 2.5rem 3.75rem 3rem -3rem hsl(var(--clr-secondary-400) / 0.25);
}
.testimonial.quote {
background-image: url(./images/bg-pattern-quotation.svg);
background-repeat: no-repeat;
background-position: top right 10%;
}
.testimonial .name {
font-size: var(--fs-400);
font-weight: var(--fw-400);
line-height: 1;
}
.testimonial .position {
font-size: var(--fs-300);
opacity: 0.5;
}
.testimonial > p:first-of-type {
font-size: var(--fs-500);
line-height: 1.2;
}
.testimonial > p:last-of-type {
opacity: 0.7;
}
@media (min-width: 500px) {
.testimonial-grid {
grid-template-areas: "one one" "two five" "three five" "four four";
}
}
@media (min-width: 700px) {
.testimonial-grid {
grid-template-areas: "one one two five" "three four four five";
}
}